package com.jiazhong.作用域;

public class Demo01 {
    public static void main(String[] args) {
        TT tt=new TT();
        Person person=new Person();
        tt.test();
        tt.test2(person);
    }
}

class Person {
    public int age=20;
    String name="jack";
    public void Say(){
        String name="King";
        System.out.println("Say()name="+name);
    }
    public void hi(){
        String address="上海";
        String name="queen";
        System.out.println(name);
    }
}

class TT {
    public void test(){
        Person person=new Person();
        person.Say();
    }
    public void test2(Person person2){
        person2.hi();
    }
}
